* {
    margin: 0;
    padding: 0;
}

.auth {
    overflow: hidden;
    width: 320px;
    background: #ffe;
}

.auth .auth-title {
    display: flex;
    position: relative;
    border-bottom: 1px solid #eee;
    height: 40px;
}

.auth .auth-title label {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: color;
    height: 100%;
    cursor: pointer;
}

.auth .auth-title em {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50%;
    border-radius: 1px;
    height: 2px;
    background-color: #f66;
    transition: all 0.3s ease-in-out;
}

.auth .auth-form {
    display: flex;
    width: 200%;
    height: 250px;
    transition: all 0.3s ease-in-out;
}

.auth .auth-form form {
    flex: 1;
    padding: 40px;
}

.auth .auth-form div {
    display: flex;
    flex-direction: column-reverse;
}

.auth .auth-form div+div {
    margin-top: 10px;
}

#register-btn:checked~.auth-title label:nth-child(2) {
    color: #f66;
    font-weight: bold;
}

#register-btn:checked~.auth-title em {
    transform: translateX(160px);
}

#register-btn:checked~.auth-form {
    transform: translateX(-320px);
}

#login-btn:checked~.auth-title label:nth-child(1) {
    color: #f66;
    font-weight: bold;
}

#login-btn:checked~.auth-title em {
    transform: translateX(0);
}
